﻿@model Stardust.Models.ServicioXHotelBean

@{
    ViewBag.Title = "Asignar Servicios";
}

<h2>Asignar Servicios</h2>
<p></p><p></p><p></p>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

    
  @using (Html.BeginForm("guardarserviciosxHotel", "AsignarServicios", FormMethod.Post, new { @class = "form" }))
  {
    @Html.HiddenFor(model => model.idhotel) 
    <fieldset>
        <div class="widget">
            <div class="title">
                <h6>Hotel</h6>
            </div>
            <div class="formRow"> @Html.LabelFor(model => model.hotel)
                <div class=" formRight"> @Html.TextBoxFor(model => model.hotel, new { @readonly = "readonly" })  </div>
                <div class="clear"></div>
            </div>
            
            
        </div>
    </fieldset>
    
    <p></p><p></p><p></p><p></p>
    
      
      
   <div class="wrapper">
    <div class="widget">
      <div class="title">
      <h6>Lista de Servicios</h6>
      </div>
      <div class="">
    <table cellpadding = "0" cellspacing = "0" width = "100%" class = "" >

    <thead>
       <tr>
            <th class="ui-state-default" rowspan="1" colspan="1" style="width:160px;">
                <div class="DataTables_sort_wrapper">
                Servicio
                <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                </div>
             </th>
             <th class="ui-state-default" rowspan="1" colspan="1" style="width:120px;" >
                <div class="DataTables_sort_wrapper">
                Precio
                <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                </div>
             </th>
        </tr>
    </thead>

    <tbody>
    @for (int i = 0; i < Model.listServHot.Count; i++)
    {

        if (!Model.listServHot[i].estado2)
        {
         @Html.HiddenFor(model => model.listServHot[i].id, new { @readonly = "readonly" }) 
     <tr class="gradeA odd">       
                
                <td class="sorting_1"> @Html.TextBoxFor(model => model.listServHot[i].nombre, new { @readonly = "readonly" }) </td>
                <td> @Html.TextBoxFor(model => model.listServHot[i].precio2)  @Html.ValidationMessageFor(model => model.listServHot[i].precio2)        </td>
                   
     </tr>
        }
        else
        {
            @Html.HiddenFor(model => model.listServHot[i].nombre) 
            @Html.HiddenFor(model => model.listServHot[i].precio2)        
             
        }
    }

    
    </tbody>

    </table>
        </div>
        
    </div>
    </div>

    <p>
      <input type="submit" value="Aceptar" class = "redB" />

    </p>   
        
       @Html.ActionLink("Regresar", "ListarServicios/" + Model.idhotel, "AsignarServicios");
  }

    

              
  